import QtQuick 2.15
import QtQuick.Controls 2.15

Item {
    id: root

    height: container.childrenRect.height + 16
	width:container.childrenRect.width  +　16
	property alias text : label.text
	property alias source:image.source
	signal clicked
	
	property bool framed : false
	Rectangle{
		anchors.fill:parent
		color:'red'
		visible:root.framed
	}
	Column{
		x: 8 ;y :8
		id : container
		Image{
			id:image
		}
		Text{
			id : label
			wrapMode:Text.WordWrap
			horizontalAlignment:Text.AlignHCenter
			width:image.width
			color: '#E0E0E0'
		}
	}
	MouseArea{
		anchors.fill:parent
		onClicked:root.clicked()
	}
	
}